<template>
	<view style="padding-bottom: 150rpx;">
		<view class="mainpadding ffffff" style="padding-bottom: 0;">
			<view class="xiahuaxian flexbetween margin_top" v-for="item in list" :key="item.id" @click="jumpdetail('/pages/mypage/tianjiadz?id=',item.id)">
				<view class="">
					<view class="flexleft">
						<view class="sanshier xiaohei" style="width: 120rpx;">{{item.name}}</view>
						<view class="sanshier xiaohei">{{item.mobile}}</view>
					</view>
					<view class="flexleft margin_top">
						<view class="flexleft" style="width: 120rpx;" v-if="item.isDefault">
							<view class="sanshier xiaohei moren">{{$t('zhuce.mr')}}</view>
						</view><view class="flexleft" style="width: 120rpx;" v-else></view>
						<view class="main_size xiaohei">{{item.detailedAddress}}</view>
					</view>
					<view class="xiaohei main_size margin_top">{{$t('dizhi.sfzh')}}：{{item.idNo}}</view>
				</view>
				<u-icon name="trash" color="#999" size="40"></u-icon>
			</view>
		</view>
		<view class="gudingdb mainpadding">
			<view class="bigbtn" @click="jumpurl('/pages/mypage/tianjiadz')">{{$t('dizhi.tjdz')}}</view>
		</view>
	</view>
</template>

<script>
	const httpRequest = require("@/common/httpRequest.js")
	export default {
		data() {
			return {
				list:[]
			}
		},
		onShow() {
			this.init()
		},
		methods: {
			init(){
				httpRequest.request("/wx/address/list",'GET', {}).then(res => {
					this.list = res.data
				})
			}
		}
	}
</script>

<style lang="scss" scoped>
	.moren{
		border: 1rpx solid #ff0000;
		font-size: 24rpx;
		color: #ff0000;
		padding: 5rpx 15rpx;
	}
</style>
